package com.chang.mapper;

import com.chang.bean.User;
import org.apache.ibatis.annotations.Mapper;

import java.io.Serializable;

/**
 * @program: erp-api
 * @description:
 * @author: chang
 * @create: 2025-02-28 10h
 **/
@Mapper
public interface UserMapper  {
    /**
     * 保存用户
     * @param user
     * @return
     */
    int save(User user);

    /**
     * 删除用户
     * @param id
     * @return
     */
    int delete(Serializable id);

    /**
     * 根据用户名查询用户
     * @param username
     * @return
     */
    int queryUserByUserName(String username);

    /**
     * 根据账号查询
     * @param account
     * @return
     */
    User queryByAccount(String account);
}
